package com.yhb.third.leshua.dao;

import com.yhb.third.leshua.LeShuaFlow;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface LeshuaExecutionFlowMapper {
    int insert(
            @Param("executionFlow") LeShuaFlow executionFlow,
            @Param("dateString") String dateString,
            @Param("extendInfo") String extendInfo
    );

    LeShuaFlow getExecutionFlowById(
            @Param("id") String id,
            @Param("dateString") String dateString
    );

    LeShuaFlow getExecutionFlowByOrderId(
            @Param("orderId") String orderId,
            @Param("dateString") String dateString
    );

    int updateExecutionFlow(
            @Param("executionFlow") LeShuaFlow executionFlow,
            @Param("dateString") String dateString
    );

    int updateExecutionFlowByRequestId(
            @Param("executionFlow") LeShuaFlow executionFlow,
            @Param("dateString") String dateString
    );

    List<LeShuaFlow> getFlowByUserIdAndDateString(
            @Param("userId") String userId,
            @Param("dateString") String dateString
    );

    List<LeShuaFlow> getSucceedFlowsOfUserAndDateString(
            @Param("userId") String userId,
            @Param("dateString") String dateString
    );

    List<LeShuaFlow> getSucceedPayFlowsOfUserAndDateString(
            @Param("userId") String userId,
            @Param("dateString") String dateString
    );

    List<LeShuaFlow> getSucceedPayFlowsAndDateString(
            @Param("dateString") String dateString
    );
}
